package carRental;

public class Bus extends Car {
	private int seatCount;
	
	public Bus(String brand, String id, double rent,int seatCount) {
		super(brand,id,rent);
		this.seatCount = seatCount;
	}
	public Bus() {
		super();
	}
	public int getSeatCount() {
		return seatCount;
	}
	public void setSeatCount(int seatCount) {
		this.seatCount = seatCount;
	}

	@Override
	public double calcRent(int days) {
		double total = 0.0;
		if(days >=  3 && days < 7) {
			total = days * this.getRent() * 0.9;
		}
		else if(days >= 7 && days < 30) {
			total = days * this.getRent() * 0.8;
		}
		else if(days >= 30 && days < 150) {
			total = days * this.getRent() * 0.7;
		}
		else if(days >= 150) {
			total = days * this.getRent() * 0.6;
		}
		else {
			total = days * this.getRent();
		}
		return total;
	}

}
